package com.isesol.ime.entity;

import com.isesol.ime.*;
import com.isesol.orm.jpa.*;

import javax.persistence.*;

/**
 * 机床参数
 *
 * @author Peter Zhang
 */
@Entity
@Table(name = "param", catalog = Constant.DB_SCHEME_MT)
@Access(AccessType.FIELD)
public class Param extends IdEntity<Long>{

	/**
	 * 参数id
	 */
	private String paramId ;

	/**
	 * 参数名称
	 */
	private String paramName;

	/**
	 * 参数类别
	 */
	@ManyToOne
	@JoinColumn(name = "CATEGORY_ID")
	private Category category;

	/**
	 * 参数单位
	 */
	private String paramUnit;

	/**
	 * 设备参数名
	 */
	private String name;

	/**
	 * 机床类型
	 */
	@ManyToOne
	@JoinColumn(name = "TYPE_ID")
	private Type type;

	/**
	 * 默认值
	 */
	private String defaultValue;

	/**
	 * 最小值
	 */
	private String minValue;

	/**
	 * 最大值
	 */
	private String maxValue;

	/**
	 * 备注
	 */
	private String memo;


	private String status;

	public Category getCategory(){

		return category;
	}

	public void setCategory(Category category){

		this.category = category;
	}

	public String getDefaultValue(){

		return defaultValue;
	}

	public void setDefaultValue(String defaultValue){

		this.defaultValue = defaultValue;
	}

	public String getMaxValue(){

		return maxValue;
	}

	public void setMaxValue(String maxValue){

		this.maxValue = maxValue;
	}

	public String getMemo(){

		return memo;
	}

	public void setMemo(String memo){

		this.memo = memo;
	}

	public String getMinValue(){

		return minValue;
	}

	public void setMinValue(String minValue){

		this.minValue = minValue;
	}

	public String getName(){

		return name;
	}

	public void setName(String name){

		this.name = name;
	}

	public String getParamId(){

		return paramId;
	}

	public void setParamId(String paramId){

		this.paramId = paramId;
	}

	public String getParamName(){

		return paramName;
	}

	public void setParamName(String paramName){

		this.paramName = paramName;
	}

	public String getParamUnit(){

		return paramUnit;
	}

	public void setParamUnit(String paramUnit){

		this.paramUnit = paramUnit;
	}

	public String getStatus(){

		return status;
	}

	public void setStatus(String status){

		this.status = status;
	}

	public Type getType(){

		return type;
	}

	public void setType(Type type){

		this.type = type;
	}

	@Override
	public String toString(){

		return "Param{" +
				"paramId='" + paramId + '\'' +
				", paramName='" + paramName + '\'' +
				", category=" + category +
				", paramUnit='" + paramUnit + '\'' +
				", name='" + name + '\'' +
				", type=" + type +
				", defaultValue='" + defaultValue + '\'' +
				", minValue='" + minValue + '\'' +
				", maxValue='" + maxValue + '\'' +
				", memo='" + memo + '\'' +
				", status='" + status + '\'' +
				'}';
	}
}
